From: Aaron Schulz Date: Fri, 29 Jul 2011 16:44:22 +0000 (+0000) Subject: * Follow-up r93093: set the touch key for page moves too X-Git-Tag: 1.31.0-rc.0~28545 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=d4337ba10e81b75d20cdf14e11e50f6e79526e81;p=lhc%2Fweb%2Fwiklou.git * Follow-up r93093: set the touch key for page moves too * Tweaked related WikiPage.php comments --- diff --git a/includes/Title.php b/includes/Title.php index a774404f28..3eae96048a 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3232,6 +3232,7 @@ class Title { if ( $u ) { $u->doUpdate(); } + # Update message cache for interface messages if ( $this->getNamespace() == NS_MEDIAWIKI ) { # @bug 17860: old article can be deleted, if this the case, @@ -3324,10 +3325,11 @@ class Title { } $nullRevId = $nullRevision->insertOn( $dbw ); + $now = wfTimestampNow(); # Change the name of the target page: $dbw->update( 'page', /* SET */ array( - 'page_touched' => $dbw->timestamp(), + 'page_touched' => $dbw->timestamp( $now ), 'page_namespace' => $nt->getNamespace(), 'page_title' => $nt->getDBkey(), 'page_latest' => $nullRevId, @@ -3339,6 +3341,7 @@ class Title { $article = new Article( $nt ); wfRunHooks( 'NewRevisionFromEditComplete', array( $article, $nullRevision, $latest, $wgUser ) ); + $article->setCachedLastEditTime( $now ); # Recreate the redirect, this time in the other direction. if ( $createRedirect || !$wgUser->isAllowed( 'suppressredirect' ) ) { diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 9c8eaea0f3..19ac74bf1e 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -846,7 +846,8 @@ class WikiPage extends Page { } /** - * Get the cached timestamp for the last time the page changed + * Get the cached timestamp for the last time the page changed. + * This is only used to help handle slave lag by comparing to page_touched. * @return string MW timestamp */ protected function getCachedLastEditTime() { @@ -856,7 +857,8 @@ class WikiPage extends Page { } /** - * Set the cached timestamp for the last time the page changed + * Set the cached timestamp for the last time the page changed. + * This is only used to help handle slave lag by comparing to page_touched. * @param $timestamp string * @return void */